package com.duobaoyu.dby.supply.db.mapper.order;


import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.duobaoyu.dby.common.mybatis.base.DbyBaseMapper;
import com.duobaoyu.dby.supply.common.biz.bo.order.OrderAmountStatisticsBO;
import com.duobaoyu.dby.supply.common.biz.bo.order.OrderExportBO;
import com.duobaoyu.dby.supply.common.biz.bo.order.OrderListBO;
import com.duobaoyu.dby.supply.common.biz.dto.order.OrderPageDTO;
import com.duobaoyu.dby.supply.common.biz.dto.order.OrderStatisticsAmountDTO;
import com.duobaoyu.dby.supply.db.entity.order.Order;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 订单信息表
 *
 * @author LY
 * @email 249007302@qq.com
 * @date 2023-09-26 10:42:54
 */
@Mapper
public interface OrderMapper extends DbyBaseMapper<Order> {

	/**
	 * 分页查询订单列表信息
	 * @param page 分页
	 * @param orderPage 入参
	 * @return IPage<OrderListBO>
	 */
	IPage<OrderListBO> queryOrderPage(@Param("page") Page<Object> page, @Param("orderPage") OrderPageDTO orderPage);

	/**
	 * 分页查询订单列表总条数
	 * @param orderPage 入参
	 * @return int
	 */
	int queryOrderPageCount(@Param("orderPage") OrderPageDTO orderPage);

	/**
	 * 获取订单列表导出信息
	 * @param orderPage 入参
	 * @return List<OrderExportBO>
	 */
	List<OrderExportBO> listOrderExportInfo(@Param("orderPage") OrderPageDTO orderPage);

	/**
	 * 计数订单列表导出信息
	 * @param orderPage 入参
	 * @return int
	 */
	int countOrderExportInfo(@Param("orderPage") OrderPageDTO orderPage);

	/**
	 * 订单金额统计
	 */
	List<OrderAmountStatisticsBO> statisticsAmount(OrderStatisticsAmountDTO orderStatisticsAmountDTO);

	/**
	 * 无物流订单
	 * @param page 页码
	 * @param pageSize 长度
	 * @return List<Order>
	 */
    List<Order> noLogisticsOrders(@Param("page") Integer page, @Param("pageSize") Integer pageSize);
}
